#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <functional>
namespace Ui {
class MainWindow;
}
class QTreeWidgetItem;
class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private:
    void visit(QTreeWidgetItem* item, std::function<void(QTreeWidgetItem*)> fun);
private slots:

    void on_treeWidget_itemSelectionChanged();

    void on_actNewNode_triggered();

    void on_actNewCurve_triggered();

    void on_actDelete_triggered();

private:
    enum treeColNum{_colName = 0, _colType, _colId};
    enum treeItemType{_itNodeItem, _itCurveItem};

    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H
